package DB.dto;

import java.io.Serializable;

public class NurseDto extends PersonDto implements Serializable
{
	protected int idNurse;
	protected int idDepartment;
    public NurseDto(PersonDto dto) {
        super();
        super.setIdPerson(dto.getIdPerson());
        super.setLogin(dto.getLogin());
        super.setName(dto.getName());
        super.setPassword(dto.getPassword());
    }

    public NurseDto() {
    }

    public int getIdNurse()
	{
		return idNurse;
	}

	public void setIdNurse(int idNurse)
	{
		this.idNurse = idNurse;
	}

	public int getIdDepartment()
	{
		return idDepartment;
	}


	public void setIdDepartment(int idDepartment)
	{
		this.idDepartment = idDepartment;
	}


	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof NurseDto)) {
			return false;
		}
		
		final NurseDto _cast = (NurseDto) _other;
		if (idNurse != _cast.idNurse) {
			return false;
		}
		
		if (idDepartment != _cast.idDepartment) {
			return false;
		}
		
		return true;
	}

	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idNurse;
		_hashCode = 29 * _hashCode + idDepartment;
		return _hashCode;
	}

	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "DB.dto.NurseDto: " );
		ret.append( "idDoctor=" + idNurse );
		ret.append( ", idDepartment=" + idDepartment );
		return ret.toString();
	}

}
